Repository navigation
fix(desktop): find every bridge action source instead of listing them - #11990
Merged
kodjima33 merged 2 commits intoAug 22, 2026
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
aryanorastar
force-pushed
the
fix/flow-lint-bridge-discovery
branch
from
August 21, 2026 04:37
6206b72 to
043d5b0
Compare
`desktop_flow_contract` exists so "an added bridge action cannot skip its flow
validation route" — its own words. It failed at exactly that.
Three actions live in `DesktopAutomationBridge+Notifications.swift`. The
hand-maintained `ACTION_SOURCE_RELATIVE_PATHS` named only the base
`DesktopAutomationBridge.swift`, so the lint never read them and reported the
flows using them as referencing actions that do not exist:
notifications-settings.yaml: unknown bridge action 'settings_notifications_snapshot'
notifications-settings.yaml: unknown bridge action 'set_notification_settings'
Because `scripts/pre-push` lints every flow rather than the diff, that failed the
push gate on every branch cut from main, on a file the pusher never touched.
That instance is already fixed: `DesktopAutomationBridge+Notifications.swift` was
added to the list by hand on main while this was being written. This change is
about the recurrence, not the instance — the list is hand-maintained, so the next
bridge file added goes unlisted the same way and takes the push gate down with it
again.
Bridge sources are now discovered by their filename prefix. Scoped to that one
prefix deliberately: the pattern the lint matches, `name: "…"`, also appears in
`APIClient`, `AuthService` and `ChatBubble`, so scanning the tree would feed it
names that are not actions and weaken the check. The prefix belongs to the bridge
and nothing else, which is why the curated list is the right shape and only its
bridge entries needed to stop being hand-maintained.
Discovery finds three files where the list named two:
Desktop/Sources/DesktopAutomationBridge.swift (125 actions)
Desktop/Sources/DesktopAutomationBridge+Notifications.swift (3)
Desktop/Sources/DesktopAutomationBridge+ChatFirst.swift (0)
`+ChatFirst` registers nothing today. It is the case this is for: a file that
exists, is not listed, and would silently take actions out of validation the day
someone adds one to it.
Verification:
python3 desktop/macos/scripts/desktop-flow-lint.py
-> desktop-flow-lint OK (72 flows, 162 registered actions)
python3 desktop/macos/tests/test_desktop_flow_contract.py -> 3 passed
python3 .github/scripts/test_run_checks.py -> 47 passed
Tests proven by reverting to the hand-maintained list: two of the three fail
and the lint reproduces the original two errors.
Wired into the check manifest in both lanes as `desktop-flow-contract-tests`.
Failure-Class: none
aryanorastar
force-pushed
the
fix/flow-lint-bridge-discovery
branch
from
August 21, 2026 18:34
043d5b0 to
e1ebb4c
Compare
Desktop Swift Static & Test Contracts failed on KernelTurnRecordedProjectionTests.testFaultHarnessResetUsesCredentialFreeControlClearOnceAndCompletesProjectionReset, a kernel-projection fault-harness test in a subsystem this PR does not touch. The same CI window produced two other unrelated Swift test failures on other PRs, each a different test. No code change.
This was referenced Aug 22, 2026
kodjima33
approved these changes
Aug 22, 2026
kodjima33
left a comment
Collaborator
There was a problem hiding this comment.
Desktop owner-override bug fix: hand-maintained bridge action list went stale twice, now discovered by filename prefix. CI green, confirmed not fixed on main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
desktop_flow_contractexists so "an added bridge action cannot skip its flow validation route" — its own words. The list it relies on is hand-maintained, and it has now gone stale twice in two days.When a bridge file is missing from the list, the lint cannot see the actions it registers and reports the flows using them as referencing actions that do not exist:
Because
scripts/pre-pushlints every flow rather than the diff, that fails the push gate on every branch cut frommain— on a file the pusher never touched. I hit it pushing something unrelated and confirmed it reproduces on a cleanorigin/maincheckout.This fixes the mechanism, not an outage
Both instances are already patched on
mainby hand —+Notifications.swift, then+ChatFirst.swift.main's own comment records the pattern:That is the argument for this change. The list drifted, was patched, drifted again, was patched again. The next bridge extension will do the same, and take the push gate down with it for everyone.
The change
Bridge sources are discovered by filename prefix instead of listed.
Scoped to that one prefix deliberately. The pattern the lint matches,
name: "…", also appears inAPIClient,AuthServiceandChatBubble, so scanning the tree would feed the lint names that are not actions and quietly weaken it. The prefix belongs to the bridge and nothing else — the curated list is the right shape, and only its bridge entries needed to stop being hand-maintained.Three files, found rather than named:
DesktopAutomationBridge.swiftDesktopAutomationBridge+Notifications.swiftDesktopAutomationBridge+ChatFirst.swiftVerification
Tests proven by reverting to the hand-maintained list: two of the three fail and the lint reproduces the original errors. A test that has never failed is not evidence.
Wired into
.github/checks-manifest.yamlin both lanes asdesktop-flow-contract-tests.Product invariants affected
none
Failure class (fixes)
Failure-Class: none